package com.baidu.project15.chart26;

class SQLSearchContext extends SearchContext{

    @Override
    public void search(String keyword) {
        //模拟实现
        if(keyword.contains("SQL")){
            System.out.println("查询关键字SQL!");
        }
        else{
            try{
                successor.search(keyword);
            }catch(NullPointerException e){
                System.out.println("未匹配到查询字段！");
            }
        }
    }
}